The present invention relates to the quality of compressed video signals, and more particularly to a method for measuring Motion Picture Engineering Group (MPEG) Program Clock Reference (PCR) jitter, frequency offset and drift rate with a selectable, constant measurement bandwidth over non-uniform PCR arrival times and a variable PCR rate.
Recovering a program system timing clock (STC) at a decoder side of a digital transmission system, such as a digital video broadcast (DVB) system, is necessary to recreate a video signal. In the Motion Picture Engineering Group (MPEG) compression scheme to allow isochronous recovery of the STC, explicit Primary Clock Reference (PCR) samples of an encoder""s program STC count, such as a 27 MHz clock count, are sent within a Transport Stream (TS). It is required that the PCR values are both (i) correct at the point of origin and (ii) not distorted in the transmission chain to the point of creating problems in the process of decoding the compressed signals. Measuring the interval between arrival times of the PCR values, the accuracy of the expected values, the arrival time and resulting jitter accumulated on the PCR values, and the transmitted arrival time in the TS is necessary to assure the confidence of decodability of the program streams. As jitter, frequency offset and frequency drift rate are important parameters for the overall process, a clear definition is needed for what is understood as PCR jitter and a guidance is needed for its measurement method.
From the specifications set forth in ISO/IEC 13818-1 it is possible to define a limit mask, as shown in FIG. 3, for the frequency deviation from the nominal program STC frequency, 27 MHz. Frequency offset is the difference between the actual value and the nominal frequency of the STC at the encoder. For 27 MHz the limit is set at +/xe2x88x92810 Hz or normalized as +/xe2x88x9230 ppm. Frequency rate of change or drift rate is the xe2x80x9cspeedxe2x80x9d at which the frequency of the program STC varies with time, i.e., it is the first derivative of the frequency with respect to time or the second derivative of phase with respect to time. The limit is set to 75 mHz/sec for the 27 MHz program STC or, normalized to the STC frequency of 27 MHz, as 10 ppm/hr. The phase tolerance is set to +/xe2x88x92500 ns which represents the maximum error of a PCR value with respect to the value it should have due to its time position in the TS.
The limits for frequency offset and drift rate are imposed for the STC as it is represented by the values of the corresponding PCR fields. They include the effects of the program STC and any possible errors in the PCR calculation. The limit of 500 ns is not imposed on the program STC, but on the accuracy representing the PCR values with respect to their position in the TS. However the PCR errors are fully equivalent to phase and jitter errors when the PCR values are used at the decoding point to reconstruct the STC.
A method for testing program STC frequency error, drift rate and PCR jitter is described in ISO/IEC 13818-9, 1996. This test is carried out for one program in the TS at a time. The procedure uses a plot of PCR values, which represent the program STC time at which the data was transmitted, against PCR arrival times, as illustrated in FIG. 1. The arrival times are plotted on the X axis and represent accurate time at the receiver. The PCR values are plotted on the Y axis. A linear regression line is fitted to N samples and the slope of the line minus one is the frequency offset. The jitter is defined as the distance of the PCR values above/below the line.
This method has the problem of determining how large N should be to accumulate enough samples. If N is too large, low frequency timing perturbations, i.e., wander, cause overly large measured values of jitter when using the straight line curve fit rather than a quadratic fit. For the linear fit the slope of this straight line is used to estimate the frequency offset. But since the frequency offset often drifts or wanders, the jitter values may be unduly large due to these wander effects. Since these values far exceed the jitter specification but are tracked by the decoder""s phase locked loop (PLL), if the drift rate is below limits they are of no concern. Therefore they should not be in the jitter measurement and should be separately quantified with respect to drift rate. The reverse is also true of the measurement of drift ratexe2x80x94small timing variations that are well within the jitter specification may, and often do, far exceed the drift rate specification since it is proportional to the second derivative of the timing or phase error. Therefore the drift rate measurement should be lowpass filtered to not include timing errors with peak variations within acceptable jitter limits. It is preferred to do a quadratic curve fit also to verify the compliance with frequency drift rate but, if N is too small, timing variations within the jitter limit cause the drift rate estimate to always exceed specification. If the PCRs do not arrive with sufficient regularity, then the regenerated STC may jitter or drift. The receiver/decoder may even go out of lock.
The timing effects visible at a TS interface point may be modeled as indicated in FIG. 2. This is an idealized model of an encoder/remultiplexer and communication network. The components of the model in the encoder are specific to the PCR for a particular program stream, whereas the components in the network relate to the entire TS.
The model has a system clock frequency oscillator with a nominal frequency, F, such as 27 MHz, but whose actual frequency deviates from this by a function, fdev(p,t). This function depends on the time (t) and is specific to a single program stream (p). This represents frequency offset for the nominal frequency which according to the MPEG standard should stay between specified tolerances. Drift rate is the rate of change with time of fdev(p,t). The drift rate also should be below limits set by the MPEG standard.
The system clock frequency oscillator drives a PCR counter which generates an idealized PCR count, Np,i, where (p) refers to the specific program stream and (i) refers to the bit position in the TS. To this is added a value from a PCR inaccuracy source, Mp,i, to create the PCR value seen in the TS, Pp,i. The simple relationship between these values is:
Pp,i=Np,i+Mp,i
At the output of the encoder the TS is being transmitted at a constant bit rate, Rnom. The communication network beyond the encoder varies the arrival time of MPEG packets from their nominal arrival time by introducing a variable delay, J(i), which is the delay in seconds for the ith bit in the TS. The nominal arrival time is calculated from Rnom and the bit index in the TS. The equation for the actual arrival time, A(i), is:
A(i)=i/Rnom+D+J(i)
D is a constant representing the fact that the time origin and bit index origin are arbitrary and that there is a mean delay through the communication network. J(i) represents the jitter in the network delay and its mean value over all time is defined to be zeroxe2x80x94this sets the value of D. J(i)+Mp,i is the overall PCR jitter which has a maximum error specification set in the MPEG standard.
A constant bandwidth method for determining the frequency offset, drift rate and jitter is preferred so that all measurement systems measure the same values on the same program PCRs at the stated bandwidth. Also a constant bandwidth measurement has more physical meaning in terms of how the recovered STC in the MPEG decoder responds to PCR errors since the decoder typically has a constant bandwidth and operates independently of PCR arrival intervals or PCR average rate.
What is desired is a method of measuring MPEG PCR jitter, frequency offset and drift rate with a selectable, constant measurement bandwidth over non-uniform PCR arrival times and a variable PCR rate.
Accordingly the present invention provides a method of measuring MPEG PCR jitter, frequency offset and drift rate with a selectable, constant measurement bandwidth over non-uniform PCR arrival times and a variable PCR rate. The selected constant bandwidth demarcates jitter from wander and is derived from a limit mask based upon the standards specified for jitter, frequency and drift rate in the MPEG standard. The PCR arrival times are measured with a reference clock and are converted to measured PCR intervals, and the measured PCR intervals, PCR values and selected constant bandwidth are input to a set of difference equations to derive the jitter, frequency and drift rate values. The set of difference equations is derived either from a type II phase locked loop or from least mean square (LMS) linear and quadratic estimators.